Block Api
Functions
Add a source to the sourceSet property of the given block. If there already exists in source set an image with the same width, that existing image will be replaced. If the source set is or gets empty, the crop and content fill mode of the associated block will be set to the default values. Note: This fetches the resource from the given URI to obtain the image dimensions. It is recommended to use setSourceSet if the dimension is known.
Add a source to the sourceSet property of the given block. If there already exists in source set an image with the same width, that existing image will be replaced. If the source set is or gets empty, the crop and content fill mode of the associated block will be set to the default values. Note: This fetches the resource from the given URI to obtain the image dimensions. It is recommended to use setSourceSet if the dimension is known.
Add a source to the sourceSet property of the given block. If there already exists in source set a video with the same width, that existing video will be replaced. If the source set is or gets empty, the crop and content fill mode of the associated block will be set to the default values. Note: This fetches the resource from the given URI to obtain the video dimensions. It is recommended to use setSourceSet if the dimension is known.
Adjust the crop position/scale to at least fill the crop frame. Required scope: "layer/crop"
Align multiple blocks vertically within their bounding box or a single block to its parent. Required scope: "layer/move"
Align multiple blocks vertically within their bounding box or a single block to its parent. Required scope: "layer/move"
Appends a new or existing child to a block's children. Required scope: "editor/add"
Inserts an effect at the end of the list of effects. The same effect can appear multiple times in the list and won't be removed if appended again. Required scope: "appearance/effect"
Updates the sorting order of this block and all of its superjacent siblings so that the given block has a higher sorting order than the next superjacent sibling. If the block is parented to a track, it is first moved up in the hierarchy. Empty tracks and empty groups are passed by.
Updates the sorting order of this block and all of its manually created siblings so that the given block has the highest sorting order. If the block is parented to a track, it is first moved up in the hierarchy.
Query if the given block can be reverted to the intrinsic aspect ratio of its image/video content. Backs the "Original" crop preset (AssetTransformPreset.ContentAspectRatio).
Returns whether the font weight of the given block can be toggled between bold and normal.
Returns whether the font style of the given block can be toggled between italic and normal.
Perform a boolean operation on the given blocks.
Create a new block.
Creates a new animation, fails if type is unknown.
Create a new audio block by extracting a specific audio track from a video fill block.
Create multiple audio blocks by extracting all audio tracks from a video fill block.
Create a new blur, fails if type is unknown or not a valid blur type.
Creates new caption blocks from the given file.
Create a cutout block whose path will be the contour of the given blocks. The cutout path for each block is derived from one of the two ways:
Perform a boolean operation on the given Cutout blocks. The cutout offset of the new block is 0. The cutout type of the new block is that of the first block. When performing a CutoutOperation.DIFFERENCE operation, the first block is the block subtracted from.
Create a Cutout block.
Create a new effect block, fails if type is unknown or not a valid effect block type.
Create a new fill, fails if type is unknown.
Create a new shape, fails if type is unknown.
Creates a new transition, fails if type is unknown.
Destroys a block. Required scope: "lifecycle/destroy"
Distribute multiple blocks vertically within their bounding box so that the space between them is even. Required scope: "layer/move"
Distribute multiple blocks vertically within their bounding box so that the space between them is even. Required scope: "layer/move"
Duplicates a block including its children. Required scope: "lifecycle/duplicate" If the block is parented to a track that is set always-on-bottom, the duplicate is inserted in the same track immediately after the block. Otherwise, the duplicate is moved up in the hierarchy.
Changes selection from selected group to a block within that group. Nothing happens if block is not a group. Required scope: "editor/select"
Changes selection from a group's selected block to that group. Nothing happens if block is not a group. Required scope: "editor/select"
Exports a design block element as a file of the given mime type. Performs an internal update to resolve the final layout for the blocks. Note: The export happens in a background thread and the Engine instance in the onPreExport lambda is a separate instance and is alive until the suspending function resumes. Use this lambda to configure the background engine for export. If uriResolver is provided it will be set on the background engine before the exported scene is loaded and once more after onPreExport is invoked (so it takes precedence if onPreExport also sets a resolver).
Exports multiple design block elements as files of the given mime type. Performs an internal update to resolve the final layout for the blocks. This method is more memory efficient than calling export repeatedly for multiple blocks as it reuses a single worker engine for all exports. Note: The export happens in a background thread and the Engine instance in the onPreExport lambda is a separate instance and is alive until the suspending function resumes. Use this lambda to configure the background engine for export. If uriResolver is provided it will be set on the background engine before the exported scene is loaded and once more after onPreExport is invoked (so it takes precedence if onPreExport also sets a resolver).
Exports a design block as a video file of the given mime type. Note: The export will run across multiple iterations of the update loop. In each iteration a frame is scheduled for encoding. Note: The export happens in a background thread and the Engine instance in the onPreExport lambda is a separate instance and is alive until the suspending function resumes. Use this lambda to configure the background engine for export. If uriResolver is provided it will be set on the background engine before the exported scene is loaded and once more after onPreExport is invoked (so it takes precedence if onPreExport also sets a resolver).
Exports multiple design blocks as video files of the given mime type. Videos are exported sequentially, with progress reported for each video. This method is more memory efficient than calling exportVideo repeatedly for multiple blocks as it reuses a single worker engine for all exports. Note: The export will run across multiple iterations of the update loop. In each iteration a frame is scheduled for encoding. Note: The export happens in a background thread and the Engine instance in the onPreExport lambda is a separate instance and is alive until the suspending function resumes. Use this lambda to configure the background engine for export. If uriResolver is provided it will be set on the background engine before the exported scene is loaded and once more after onPreExport is invoked (so it takes precedence if onPreExport also sets a resolver).
Exports a design block element as a file of the given mime type. Performs an internal update to resolve the final layout for the blocks. Note: The export happens in a background thread and the Engine instance in the onPreExport lambda is a separate instance and is alive until the suspending function resumes. Use this lambda to configure the background engine for export. If uriResolver is provided it will be set on the background engine before the exported scene is loaded and once more after onPreExport is invoked (so it takes precedence if onPreExport also sets a resolver).
Exports multiple design block elements as files of the given mime type with color masks. Performs an internal update to resolve the final layout for the blocks. This method is more memory efficient than calling exportWithColorMask repeatedly for multiple blocks as it reuses a single worker engine for all exports. Note: The export happens in a background thread and the Engine instance in the onPreExport lambda is a separate instance and is alive until the suspending function resumes. Use this lambda to configure the background engine for export. If uriResolver is provided it will be set on the background engine before the exported scene is loaded and once more after onPreExport is invoked (so it takes precedence if onPreExport also sets a resolver).
Resize and position a block to entirely fill its parent block. The crop values of the block, except for the flip and crop rotation, are reset if it can be cropped. If the size of the block's fill is unknown, the content fill mode is changed from Crop to Cover to prevent invalid crop values. Required scope: "layer/move"
Return all blocks currently known to the engine.
Query all metadata keys that exist on this block.
Return all placeholder blocks in the current scene.
Get all available properties of a block.
Get all currently selected blocks.
Return all blocks that are not attached to any scene.
Finds all blocks with the given kind.
Finds all blocks with the given name.
Finds all design blocks with the given type.
Finds all blur blocks with the given type.
Finds all effect blocks with the given type.
Finds all shape blocks with the given type.
Adjusts the crop in order to flip the content along its own horizontal axis.
Adjusts the crop in order to flip the content along its own vertical axis.
Begins loading the required audio and video resource for the given video fill or audio block. If the resource had been loaded earlier and resulted in an error, it will be reloaded.
Begins loading the resources of the given blocks and their children. If the resource had been loaded earlier and resulted in an error, it will be reloaded. Note: This function is useful for preloading resources before they are needed. Warning: For elements with a source set, all elements in the source set will be loaded.
Generate a thumbnail sequence for the given audio block or video fill. A thumbnail in this case is a chunk of samples in the range of 0 to 1. In case stereo data is requested, the samples are interleaved, starting with the left channel. Note: There can only be one thumbnail generation request in progress for a given block. Note: During playback, the thumbnail generation will be paused.
Generate a thumbnail sequence for the given video fill or design block. Note: There can only be one thumbnail generation request in progress for a given block. Note: During playback, the thumbnail generation will be paused.
Get information about all audio tracks from a video fill block.
Get the number of available audio tracks in a video fill block.
Get the duration in seconds of the video or audio resource that is attached to the given block.
Get the background color of the given design block.
Get the blend mode of the given design block.
Get the blur block of the given design block.
Get the value of a boolean property of the given design block.
Get all children of the given block. Children are sorted in their rendering order: Last child is rendered in front of other children.
Get the value of a color property of the given design block.
Get the spot color name of a color property of the given design block.
Get the spot color tint factor of a color property of the given design block.
Query a block's horizontal content fill alignment.
Query a block's content fill mode.
Query a block's vertical content fill alignment.
Get the crop rotation of the given design block.
Get the crop scale ratio of the given design block.
Get the crop scale in x direction of the given design block.
Get the crop scale in y direction of the given design block.
Get the crop translation in x direction of the given design block.
Get the crop translation in y direction of the given design block.
Extracts the dominant colors from the rendered appearance of a block.
Get the value of a double property of the given design block.
Get the drop shadow's blur radius on the x axis of the given design block.
Get the drop shadow's blur radius on the y axis of the given design block.
Get the drop shadow's clipping of the given design block.
Get the drop shadow color of the given design block.
Get the drop shadow's x offset of the given design block.
Get the drop shadow's y offset of the given design block.
Get the playback duration of the given block in seconds. The duration defines for how long the block is active in the scene during playback. Note: The duration is ignored when the scene is not in Video mode.
Get a list of all effects attached to this block.
Get the value of an enum property of the given design block.
Get all the possible values of an enum given an enum property.
Returns the block containing the fill properties of the given block.
Query whether the fill of the given design block is marked as overprint.
Get the fill color of the given design block.
Get the value of a float property of the given design block.
Get a block's layout height. The layout height is only available after an internal update loop, which may not happen immediately.
Get a block's layout width. The layout width is only available after an internal update loop, which may not happen immediately.
Get a block's layout position on the x-axis. The layout position is only available after an internal update loop, which may not happen immediately.
Get a block's layout position on the y-axis. The layout position is only available after an internal update loop, which may not happen immediately.
Get the height of the block's axis-aligned bounding box in the scene's global coordinate space. The scene's global coordinate space has its origin at the top left.
Get the width of the block's axis-aligned bounding box in the scene's global coordinate space. The scene's global coordinate space has its origin at the top left.
Get the x position of the block's axis-aligned bounding box in the scene's global coordinate space. The scene's global coordinate space has its origin at the top left.
Get the y position of the block's axis-aligned bounding box in the scene's global coordinate space. The scene's global coordinate space has its origin at the top left.
Get the gradient color stops property of the given design block.
Query a block's height.
Query a block's mode for its height.
Get the "in" animation of the given block.
Get the value of an int property of the given design block.
Get the kind of the given block, fails if the block is invalid.
Get the "loop" animation of the given block.
Get a metadata value of a block identified by a key. If the key does not exist, yet, this method will fail.
Get a block's name.
Get the opacity of the given design block.
Gets the "out" animation of the given block.
Query a block's parent.
Gets the playback speed multiplier of a block that supports playback control.
Get the playback time of the given block.
Query a block's x position.
Query a block's mode for its x position.
Query a block's y position.
Query a block's mode for its y position.
Get the type of a property given its name.
Query a block's rotation in radians.
Get the position and size of the axis-aligned bounding box for the given blocks in screen space.
Returns the block containing the shape properties of the given block.
Returns the source set of a source set property of the given block.
Get the name of the spot color assigned to a cutout type.
Get the current state of a block. Note If this block is in error state or this block has a Shape block, Fill block or Effect block(s), that is in error state, the returned state will be BlockState.Error. Else, if this block is in pending state or this block has a Shape block, Fill block or Effect block(s), that is in pending state, the returned state will be BlockState.Pending. Else, the returned state will be BlockState.Ready.
Get the value of a string property of the given design block.
Get the legacy single stroke cap of the given design block. Tracks the value last written via setStrokeCap or setStrokeStartCap; ignores changes made via setStrokeEndCap.
Get the stroke color of the given design block.
Get the stroke corner geometry of the given design block.
Get the custom dash pattern of the given design block's stroke.
Query the cap geometry at the trailing edge of each dash piece.
Get the dash offset of the given design block's stroke.
Query the cap geometry at the leading edge of each dash piece.
Query the cap geometry at the end of an open stroked path.
Query whether the stroke of the given design block is marked as overprint.
Get the stroke position of the given design block.
Query the cap geometry at the start of an open stroked path.
Get the stroke style of the given design block.
Get the stroke width of the given design block.
Returns the ordered list of text cases of the text in the selected range.
Returns the tight ink-paint bounding box of each grapheme in the given range. Required scope: "text/character"
Returns the ordered unique list of colors of the text in the selected range.
Returns the indices of the selected range of the text block that is currently being edited. If both the start and end index of the returned range have the same value, then the text cursor is positioned at that index.
Returns the ordered list of unique text decoration configurations in the selected range.
Gets the effective horizontal alignment of a text block. If the alignment is set to Auto, this returns the resolved alignment (Left or Right) based on the text direction of the first logical run. This never returns 'Auto'.
Returns the ordered unique list of font sizes of the text in the selected range.
Returns the ordered unique list of font styles of the text in the selected range.
Returns the ordered unique list of font weights of the text in the selected range.
Returns the paragraph-level horizontal alignment override for a specific paragraph, or the block-level alignment for negative paragraph indices.
Returns the unique kerning values across the grapheme range.
Returns the bounds of the visible area of the given line of the text block. The values are in the scene's global coordinate space (which has its origin at the top left).
Returns the line height multiplier for a specific paragraph of a text block.
Returns the list nesting level for a specific paragraph of a text block.
Returns the list style for a specific paragraph of a text block.
Returns the SVG path currently used as the text block's baseline, or null if normal layout is active.
Returns whether text is placed on the opposite side of the baseline path.
Returns the start offset along the baseline path as a proportion of the path length.
Returns the 0-based paragraph indices that overlap the given range.
Returns all text runs within the given range of text.
Returns the text content of the given visible line of the text block.
Returns the number of visible lines in the given text block.
Get the time offset of the given block relative to its parent.
Returns the total duration (in seconds) of a scene in video mode. The duration is defined by all blocks in the scene.
Gets the outgoing transition assigned to a clip.
Get the trim length of the given block or fill.
Get the trim offset of this block. Note: This requires the video or audio clip to be loaded.
Get the type of the given block, fails if the block is invalid.
Returns the typeface property of the text block. Does not return the typefaces of the text runs.
Returns the typefaces of the text block.
Get the value of a uri property of the given design block.
Get a block's unique identifier.
Get the video height in pixels of the video resource that is attached to the given block.
Get the video width in pixels of the video resource that is attached to the given block.
Get the audio volume of the given block.
Query a block's width.
Query a block's mode for its width.
Group blocks together.
Query if the given block has background color properties.
Query if the given block has a blend mode.
Checks whether the block supports blur.
Query if the given block has a content fill mode.
Query if the given block has crop properties.
Query if the given block has a drop shadow property.
Returns whether the block has a duration property.
Checks whether an effect block may be enabled and disabled.
Queries whether the block supports effects.
Query if the given block has fill color properties.
Check if the block has metadata associated with the key.
Query if the given block has an opacity.
Query whether the block supports placeholder behavior.
Checks whether the block supports placeholder controls.
Returns whether the block supports a playback control.
Returns whether the block has a playback time property.
Query if the given block has a shape property.
Query if the given block has a stroke property.
Returns whether the block has a time offset property.
Returns whether the block has trim properties.
Insert a new or existing child at a certain position in the parent's children. Required scope: "editor/add"
Inserts an effect at the given index into the list of effects of the given block. The same effect can appear multiple times in the list and won't be removed if appended again. Required scope: "appearance/effect"
Confirms that a given set of blocks can be aligned.
Check if a scope is allowed for a given block.
Query a block's always-on-bottom property.
Query a block's always-on-top property.
Returns whether the audio and video resource for the given video fill or audio block is loaded. Note that the function is unstable and mared with UnstableEngineApi.
Query if the background of the given design block is enabled.
Query if blur is enabled for the given block.
Query a block's clipped state. If true, the block should clip
Checks whether blocks could be combined.
Check if the crop aspect ratio is locked for the given block. When locked, crop handles will maintain the current aspect ratio during resize.
Confirms that a given set of blocks can be distributed.
Query if the drop shadow of the given design block is enabled.
Queries whether an effect block is enabled and therefore applies its effect.
Query if the fill of the given design block is enabled.
Query a block's horizontal flip state.
Query a block's vertical flip state.
Query whether the block is muted due to engine constraints.
Confirms that a given set of blocks can be grouped together.
Query if the given block is included on the exported result.
Checks whether a graphic block originated as a line shape.
Query whether the block is looping.
Query whether the block is muted.
Returns whether the block is a duration source block.
Query whether the placeholder behavior for a block is enabled.
Query whether the placeholder button for a block is shown.
Query whether the placeholder overlay pattern for a block is shown.
Query whether the placeholder function for a block is enabled.
Returns whether the block is currently during active playback.
Check if a property with a given name is readable.
Check if a property with a given name is writeable.
Check if a property with a given name is writeable.
Query whether a scope is enabled for a given block.
Get the selected state of a block.
Return whether the given block or fill is currently set to play its contents while the rest of the scene remains paused.
Query if the stroke of the given design block is enabled.
Query a block's transform locked state. If true, the block's transform can't be changed.
Check if a block is valid. A block becomes invalid once it has been destroyed.
Query a block's visibility.
Returns whether the block should be visible on the canvas at the current playback time.
Loads existing blocks from an archive. The archiveUri should be that of a file previously saved with saveToArchive. The blocks are not attached by default and won't be visible until attached to a page or the scene. The UUID of the loaded blocks is replaced with a new one.
Loads existing blocks from the given string. The blocks are not attached by default and won't be visible until attached to a page or the scene. The UUID of the loaded blocks is replaced with a new one.
Loads existing blocks from a URL.
Subscribe to block click events. Note: DesignBlock is emitted at the end of the engine update if it has been clicked.
Subscribe to changes in the current set of selected blocks.
Subscribe to changes to the state of a block. Like getState, the state of a block is determined by the state of itself and its Shape, Fill and Effect block(s).
Checks whether the given block references any variables. Doesn't check the block's children.
Removes the effect at the given index. Required scope: "appearance/effect"
Remove metadata associated with the key from the given block.
Remove the block as duration source block for the page. If a scene or page given set as block, it is deactivated for all blocks in the scene or page.
Removes selected range of text of the given text block. Required scope: "text/edit"
Removes the outgoing transition of a clip.
Inserts the given text into the selected range of the text block. Required scope: "text/edit"
Resets the manually set crop of the given design block. The block's content fill mode is set to ContentFillMode.COVER. If the block has a fill, the crop values are updated so that it covers the block. Required scope: "layer/crop"
Resize all blocks to the given size. The content of the blocks is automatically adjusted to fit the new dimensions. Required scope: "layer/resize"
Saves the given blocks to an archive. Note: All given block handles must be valid, otherwise this call returns an error.
Saves the given blocks to a proprietary string. If a resource uri has a scheme that is not in allowedResourceSchemes, an exception will be thrown. Note: All given block handles must be valid, otherwise an exception will be thrown.
Scales the block and all of its children proportionally around the specified relative anchor point. This updates the position, size and style properties (e.g. stroke width) of the block and its children. Required scope: "layer/resize"
Selects the given block and deselects all other blocks.
Updates the sorting order of this block and all of its manually created and subjacent siblings so that the given block will have a lower sorting order than the next subjacent sibling. If the block is parented to a track, it is first moved up in the hierarchy. Empty tracks and empty groups are passed by.
Updates the sorting order of this block and all of its manually created siblings so that the given block has the lowest sorting order. If the block is parented to a track, it is first moved up in the hierarchy.
Update the block's always-on-bottom property. If true, this blocks's global sorting order is automatically adjusted to be lower than all other siblings without this property. If more than one block is set to be always-on-bottom, the child order decides which is on the bottom.
Update the block's always-on-top property. If true, this blocks's global sorting order is automatically adjusted to be higher than all other siblings without this property. If more than one block is set to be always-on-top, the child order decides which is on top.
Set an audio fade-in for the given block. The audio ramps up from silence to the block's volume over the given duration at the start of the block.
Set an audio fade-out for the given block. The audio ramps down from the block's volume to silence over the given duration at the end of the block.
Set the background color of the given design block. Required scope: "fill/change"
Enable or disable the background of the given design block. Required scope: "fill/change"
Set the blend mode of the given design block. Required scope: "layer/blendMode"
Enable or disable the blur of the given design block.
Set a boolean property of the given design block to the given value.
Update a block's clipped state. Required scope: "layer/clipping"
Set a color property of the given design block to the given value.
Set a color property of the given design block to the given value.
Set the horizontal alignment of the content fill inside the block.
Set a block's content fill mode. Required scope: "layer/crop"
Set the vertical alignment of the content fill inside the block.
Set whether the crop aspect ratio should be locked for the given block. When enabled, the block will have a FixedAspectRatioTag and crop handles will maintain aspect ratio. When disabled, the FixedAspectRatioTag will be removed and free resizing is allowed. Required scope: "layer/crop"
Set the crop rotation of the given design block. Required scope: "layer/crop"
Set the crop scale ratio of the given design block. This will uniformly scale the content up or down. The center of the scale operation is the center of the crop frame. Required scope: "layer/crop"
Set the crop scale in x direction of the given design block. Required scope: "layer/crop"
Set the crop scale in y direction of the given design block. Required scope: "layer/crop"
Set the crop translation in x direction of the given design block. Required scope: "layer/crop"
Set the crop translation in y direction of the given design block. Required scope: "layer/crop"
Set a double property of the given design block to the given value.
Set the drop shadow's blur radius on the x axis of the given design block. Required scope: "appearance/shadow"
Set the drop shadow's blur radius on the y axis of the given design block. Required scope: "appearance/shadow"
Set the drop shadow's clipping of the given design block. (Only applies to shapes.) Required scope: "appearance/shadow"
Set the drop shadow color of the given design block. Required scope: "appearance/shadow"
Enable or disable the drop shadow of the given design block. Required scope: "appearance/shadow"
Set the drop shadow's x offset of the given design block. Required scope: "appearance/shadow"
Set the drop shadow's y offset of the given design block. Required scope: "appearance/shadow"
Set the playback duration of the given block in seconds. The duration defines for how long the block is active in the scene during playback. If a duration is set on the page block, it becomes the duration source block. Note: The duration is ignored when the scene is not in "Video" mode. Note: This also adjusts the trim for non looping blocks.
Sets the enabled state of an effect block.
Set an enum property of the given design block to the given value.
Sets the block containing the fill properties of the given block. Note: The previous fill block is not destroyed automatically. Required scopes: "fill/change", "fill/changeType"
Enable or disable the fill of the given design block. Required scope: "fill/change"
Mark the fill of the given design block as overprint for PDF export.
Set the fill color of the given design block. Required scope: "fill/change"
Update a block's horizontal flip. Required scope: "layer/flip"
Update a block's vertical flip. Required scope: "layer/flip"
Set a float property of the given design block to the given value.
Sets the given font and typeface for the text block. Existing formatting is reset. Required scope: "text/character"
Set a gradient color stops property of the given design block.
Update a block's height and optionally maintain the crop. If the crop is maintained, the crop values will be automatically adjusted. The content fill mode Cover is only kept if the features/transformEditsRetainCoverMode setting is enabled, otherwise it will change to Crop. If the size of a group is changed, both dimensions are modified and the aspect ratio of the group is kept. Required scope: "layer/resize"
Set a block's mode for its height. Required scope: "layer/resize"
Sets the "in" animation for the given block.
Set if you want the given design block to be included in exported result.
Set an int property of the given design block to the given value.
Set the kind of the given block, fails if the block is invalid.
Sets the "loop" animation for the given block.
Set whether the block should start from the beginning again or stop.
Set a metadata value of a block identified by a key. If the key does not exist, yet, it will be added.
Set whether the audio of the block is muted.
Update a block's name.
Update the pixels of the given pixelStreamFill block. This method should be called in order to bind a new android.graphics.SurfaceTexture to the pixelStreamFill, as well as after every android.graphics.SurfaceTexture.updateTexImage invocation. Note that the native texture is created only once: all subsequent calls on the same pixel stream fill will return the same id.
Set the opacity of the given design block. Required scope: "layer/opacity"
Sets the "out" animation for the given block.
Set a block as duration source so that the overall page duration is automatically determined by this. If no defining block is set, the page duration is calculated over all children. Only one block per page can be marked as duration source. Will automatically unmark the previously marked.
Enable or disable the placeholder behavior for a block.
Enable or disable the visibility of the placeholder button for a block.
Enable or disable the visibility of the placeholder overlay pattern for a block.
Enable or disable the placeholder function for a block.
Sets the playback speed multiplier of a block that supports playback control. Note: This also adjusts the trim and duration of the block. Video fills running faster than 3.0x are force muted until reduced to 3.0x or below.
Set the playback time of the given block.
Set whether the block should be during active playback.
Update a block's x position. The position refers to the block's local space, relative to its parent with the origin at the top left. Required scope: "layer/move"
Set a block's mode for its x position. The position refers to the block's local space, relative to its parent with the origin at the top left. Required scope: "layer/move"
Update a block's y position. The position refers to the block's local space, relative to its parent with the origin at the top left. Required scope: "layer/move"
Set a block's mode for its y position. The position refers to the block's local space, relative to its parent with the origin at the top left. Required scope: "layer/move"
Update a block's rotation. Required scope: "layer/rotate"
Enable or disable a scope for a given block.
Update the selection state of a block. Fails for invalid blocks. Note: Previously selected blocks remain selected. Required scope: "editor/select"
Sets the block containing the shape properties of the given block. Note: The previous shape block is not destroyed automatically. Required scope: "shape/change"
Set whether the given block or fill should play its contents while the rest of the scene remains paused. Note: Setting this to true for one block will automatically set it to false on all other blocks.
Set the source set of a source set property of the given block. The crop and content fill mode of the associated block will be set to the default values.
Set the spot color assign to a cutout type. If no spot color is set, type CutoutType.SOLID is assigned "CutContour" and type CutoutType.DASHED is assigned "PerfCutContour". All cutout blocks of the given type will be immediately assigned that spot color.
Set the state of a block.
Set a string property of the given design block to the given value.
Set the stroke cap of the given design block. Writes both the start and end caps to the same value. Required scope: "stroke/change"
Set the stroke color of the given design block. Required scope: "stroke/change"
Set the stroke corner geometry of the given design block. Required scope: "stroke/change"
Set a custom dash pattern for the given design block's stroke. Semantics match SVG's stroke-dasharray: alternating on/off lengths in design-unit space. When the pattern is non-empty it overrides the preset implied by StrokeStyle. Pass an empty list to fall back to the preset. Required scope: "stroke/change"
Set the cap geometry at the trailing edge of each dash piece (excluding the line's actual end). Only takes effect when a dash pattern is active. Distinct from setStrokeEndCap, which only applies to the end of the open path itself.
Set the dash offset of the given design block's stroke. Semantics match SVG's stroke-dashoffset. Ignored when the custom dash pattern is empty. Required scope: "stroke/change"
Set the cap geometry at the leading edge of each dash piece (excluding the line's actual start). Only takes effect when a dash pattern is active. Distinct from setStrokeStartCap, which only applies to the start of the open path itself.
Enable or disable the stroke of the given design block. Required scope: "stroke/change"
Set the cap geometry at the end of an open stroked path.
Mark the stroke of the given design block as overprint for PDF export.
Set the stroke position of the given design block. Required scope: "stroke/change"
Set the cap geometry at the start of an open stroked path. Pair with setStrokeEndCap to set each end independently; setStrokeCap remains as a both-ends shortcut.
Set the stroke style of the given design block. Required scope: "stroke/change"
Set the stroke width of the given design block. Required scope: "stroke/change"
Sets the given text case for the selected range of text. Required scope: "text/character"
Changes the color of the text in the selected range to the given color. Required scope: "fill/change"
Sets the text cursor range (selection) within the text block that is currently being edited. If from equals to, the cursor is positioned at that index.
Sets the text decoration for the selected range of text. Required scope: "text/character"
Changes the size of the text in the selected range to the given size. If the font size is applied to the entire text block, its font size property will be updated. Required scope: "text/character"
Changes the style of the text in the selected range to the given style. Required scope: "text/character"
Changes the weight of the text in the selected range to the given weight. Required scope: "text/character"
Sets the paragraph-level horizontal alignment override for one or all paragraphs of a text block. Required scope: "text/character"
Sets kerning for a grapheme range.
Sets the line height multiplier for a specific paragraph or all paragraphs of a text block. Required scope: "text/character"
Sets the list nesting level for a specific paragraph or all paragraphs of a text block. Required scope: "text/character"
Sets the list style for a specific paragraph or all paragraphs of a text block. Required scope: "text/character"
Sets or clears the SVG path that defines a text block's baseline.
Sets whether text is placed on the opposite side of the baseline path.
Sets the start offset along the baseline path as a proportion of the path length.
Set the time offset of the given block relative to its parent. The time offset controls when the block is first active in the timeline. Note: The time offset is not supported by the page block.
Update a block's transform locked state.
Assigns the outgoing transition of a clip.
Set the trim length of the given block or fill. The trim length is the duration of the audio or video clip that should be used for playback. Note: After reaching this value during playback, the trim region will loop. Note: This requires the video or audio clip to be loaded.
Set the trim offset of the given block or fill. Sets the time in seconds within the fill at which playback of the audio or video clip should begin. Note: This requires the video or audio clip to be loaded.
Sets the given typeface for the text block. The current formatting, e.g., bold or italic, is retained as far as possible. Some formatting might change if the new typeface does not support it, e.g. thin might change to light, bold to normal, and/or italic to non-italic. If the typeface is applied to the entire text block, its typeface property will be updated. If a run does not support the new typeface, it will fall back to the default typeface from the typeface property. Required scope: "text/character"
Set a uri property of the given design block to the given value.
Update a block's visibility. Required scope: "layer/visibility"
Set the audio volume of the given block.
Update a block's width and optionally maintain the crop. If the crop is maintained, the crop values will be automatically adjusted. The content fill mode Cover is only kept if the features/transformEditsRetainCoverMode setting is enabled, otherwise it will change to Crop. If the size of a group is changed, both dimensions are modified and the aspect ratio of the group is kept. Required scope: "layer/resize"
Set a block's mode for its width. Required scope: "layer/resize"
Split a block at the specified time. The original block will be trimmed to end at the split time, and the returned duplicate will start at the split time and continue to the original end time.
Returns whether the block supports animation.
Query if the given block has background color properties.
Query if the given block has a blend mode.
Checks whether the block supports blur.
Query if the given block has a content fill mode.
Query if the given block has crop properties.
Query if the given block has a drop shadow property.
Returns whether the block has a duration property.
Queries whether the block supports effects.
Query if the given block has fill color properties.
Query if the given block has an opacity.
Returns whether the block can be marked as the element that defines the duration of the given page.
Query whether the block supports placeholder behavior.
Checks whether the block supports placeholder controls.
Returns whether the block supports a playback control.
Returns whether the block has a playback time property.
Query if the given block has a shape property.
Query if the given block has a stroke property.
Returns whether the block has a time offset property.
Checks whether a clip can own an outgoing clip-to-clip transition.
Returns whether the block has trim properties.
Toggles the font weight of the given block between bold and normal. Required scope: "text/character"
Toggles the font style of the given block between italic and normal. Required scope: "text/character"
Toggles the text decoration overline of the given block. Required scope: "text/character"
Toggles the text decoration strikethrough of the given block. Required scope: "text/character"
Toggles the text decoration underline of the given block. Required scope: "text/character"
Ungroups a group.